home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / cut101.zip / CUT.DOC next >
Text File  |  1987-07-21  |  3KB  |  124 lines

  1.  
  2.  
  3.  
  4.       CUT - Field Cut Utility
  5.  
  6.  
  7.       NAME
  8.  
  9.            CUT -     cut out specified fields from each line of a file
  10.  
  11.       SYNOPSIS
  12.  
  13.       cut [-s] [-t<format>] [-d<string>] <-c<list> | -f<list>> file ...
  14.  
  15.       DESCRIPTION
  16.  
  17.            Cut will cut out fields from each line of the files
  18.            specified as input arguments.  The fields specified may be
  19.            of fixed length, or separated by any number of delimiter
  20.            characters.  If no file arguments are specified, cut will
  21.            act as a filter, using standard input.
  22.  
  23.            Cut may be used with the following options;
  24.  
  25.             -f<list>
  26.                   the list following the -f option is a comma
  27.                   separated list of integers specifying the
  28.                   field numbers which will be cut from the
  29.                   input.
  30.  
  31.             -c<list>
  32.                   specify character column numbers from which
  33.                   output will be cut, e.g., 5-80, 1,8, etc.
  34.                   All characters within the specified columns
  35.                   will be output.
  36.  
  37.             Note that either the -c or -f options, but not both
  38.             must be specified.
  39.  
  40.             -d<string>
  41.                   All characters in the specified string will
  42.                   be considered delimiters when used with the
  43.                   -f option.  The default delimiters are space
  44.                   and tab.    The tab character can be repre-
  45.                   sented as \t.  Spaces and other characters
  46.                   with special meaning must be enclosed in
  47.                   quotes.
  48.  
  49.             -s
  50.                   The -s option will suppress the output of
  51.                   lines which contain no delimiters.  The
  52.                   default is to output the entirety of lines
  53.                   which do not contain any delimiters.  This
  54.                   option is only used with the -f option.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.       CUT - Field Cut Utility                   Page 1
  61.       Copyright (c) 1986, Syncom, Inc.
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.       CUT - Field Cut Utility
  71.  
  72.  
  73.  
  74.             -t<string>
  75.                   The -t option specifies a string to be used
  76.                   as a format string for output.  Field argu-
  77.                   ments are placed by use of the %s format
  78.                   specifier.  Note that since the '%' character
  79.                   is treated specially by command.com in the
  80.                   execution of batch files, it must be
  81.                   specified as %% when used in a batch file.
  82.  
  83.  
  84.       EXAMPLES
  85.            dir | cut -f1,2 -t"%s.%s"
  86.  
  87.            will output the (reformatted) file names in a directory,
  88.       (plus some other junk).
  89.  
  90.  
  91.            cut -c1,20 file1 >file2
  92.  
  93.            will output the first 20 columns from file1 to file2.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. Release Note:
  101.     Version 1.01 supports multiple input files on the command line
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Any comments, suggestions or criticisms;
  110.  
  111.             Bob Halsall
  112.             c/o Eastern 'C' Board
  113.             Suffern, NY
  114.             (914)-368-0658
  115.  
  116. If you find yourself using this program, please send
  117. a few dollars to ( the hardest part will be addressing the envelope!) :
  118.  
  119.             The American Cancer Society
  120.             90 Park Avenue
  121.             New York, New York 10016
  122.  
  123.  
  124.